﻿// Copyright © 2011 Paul Vanukoff (pvanukoff@gmail.com)

using System;

namespace Bravura.Native.PluginBase.Waveforms
{
	/// <summary>
	/// Pulse waveform with variable width.
	/// </summary>
	public class PulseWaveform : Waveform
	{
		private double _width = 0.50;

		public void SetWidth(double width)
		{
			_width = width;
		}

		#region Waveform Implementation

		public override double GetValue(double pos)
		{
			return pos < _width ? -1.0 : 1.0;
		}

		#endregion
	}
}
